<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Linux系统资源监控命令vmstat\mpstat\sar\iostat\top - dkcndk - 博客园</title>
<link type="text/css" rel="stylesheet" href="2029097_files/common.css">
<link id="MainCss" type="text/css" rel="stylesheet" href="2029097_files/style.css">
<link type="text/css" rel="stylesheet" href="2029097_files/common2.css">
<link type="text/css" rel="stylesheet" href="2029097_files/shCore.css">
<link type="text/css" rel="stylesheet" href="2029097_files/shThemeDefault.css">
<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/dkblog/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/dkblog/rsd.xml">
<link type="application/wlwmanifest+xml" rel="wlwmanifest" href="http://www.cnblogs.com/dkblog/wlwmanifest.xml"> 
<script src="2029097_files/ga.js" async="" type="text/javascript"></script><script src="2029097_files/gpt.js" type="text/javascript" async=""></script><script src="2029097_files/jquery_002.js" type="text/javascript"></script>  
<script src="2029097_files/common.js" type="text/javascript"></script>
<script src="2029097_files/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="2029097_files/shCore.js"></script>
<script type="text/javascript" src="2029097_files/shLanguage.js"></script>
<script src="2029097_files/google_ads_gpt.js" type="text/javascript" async=""></script></head>
<body>
<a name="top"></a>
<form method="post" action="2029097.html" id="Form1">
<div class="aspNetHidden">
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="" type="hidden">
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>



<script type="text/javascript">
//<![CDATA[
var currentBlogApp='dkblog';
//]]>
</script>

    
<div id="home">
<div id="header">
	<div id="blogTitle">
		
<!--done-->
<div class="title"><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/dkblog/">DK's Blog</a></div>
<div class="subtitle">这是DK的博客. 认真做事.</div>



		
	</div><!--end: blogTitle 博客的标题和副标题 -->
	<div id="navigator">
		
<ul id="navList">
<li><a id="MyLinks1_HomeLink" class="menu" href="http://www.cnblogs.com/">博客园</a></li>
<li><a id="MyLinks1_MyHomeLink" class="menu" href="http://www.cnblogs.com/dkblog/">首页</a></li>
<li><a class="menu" href="http://q.cnblogs.com/">博问</a></li>
<li><a class="menu" href="http://home.cnblogs.com/ing/">闪存</a></li>
<li><a id="MyLinks1_NewPostLink" class="menu" rel="nofollow" href="http://www.cnblogs.com/dkblog/admin/EditPosts.aspx?opt=1">新随笔</a></li>
<li><a id="MyLinks1_ContactLink" class="menu" rel="nofollow" href="http://space.cnblogs.com/msg/send/dkcndk">联系</a></li>
<li><a id="MyLinks1_Syndication" class="menu" href="http://www.cnblogs.com/dkblog/rss">订阅</a>
<!--<a id="MyLinks1_XMLLink" class="aHeaderXML" href="http://www.cnblogs.com/dkblog/rss"><img src="/Skins/Custom/images/rss.gif" alt="订阅" /></a>--></li>
<li><a id="MyLinks1_Admin" class="menu" rel="nofollow" href="http://www.cnblogs.com/dkblog/admin/EditPosts.aspx">管理</a></li>
</ul>

		<div class="blogStats">
			
			
<!--done-->
随笔-526&nbsp;
文章-0&nbsp;
评论-2&nbsp;

			
		</div><!--end: blogStats -->
	</div><!--end: navigator 博客导航栏 -->
</div><!--end: header 头部 -->
<div id="main">
	<div id="mainContent">
	<div class="forFlow">
		
				
<!--done-->
<div id="topics">
	<div class="post">
		<h1 class="postTitle">
			<a id="ctl02_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/dkblog/archive/2011/04/26/2029097.html">Linux系统资源监控命令vmstat\mpstat\sar\iostat\top</a>
		</h1>
		<div class="clear"></div>
		<div class="postBody">
			<div id="cnblogs_post_body"><p><span color="#000000" style="color: #000000;"><span color="#000000" style="color: #000000;"></span><span color="#000000" style="color: #000000;"></span>Linux系统资源的命令:</span></p>
<p><span color="#000000" style="color: #000000;"><span color="#000000" style="color: #000000;"></span>衡量CPU性能的指标：</span></p>
<p><span color="#000000" style="color: #000000;">1，用户使用CPU的情况；<br>CPU运行常规用户进程<br>CPU运行niced process<br>CPU运行实时进程</span></p>
<p><span color="#000000" style="color: #000000;">2，系统使用CPU情况；<br>用于I/O管理：中断和驱动<br>用于内存</span><a nclick="javascript.:tagshow(event, '%B9%DC%C0%ED');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">管理</span></strong></span></a><span color="#000000" style="color: #000000;">：页面交换<br>用户进程管理：进程开始和上下文切换</span></p>
<p><span color="#000000" style="color: #000000;">3，WIO：用于进程等待磁盘I/O而使CPU处于空闲状态的比率。</span></p>
<p><span color="#000000" style="color: #000000;">4，CPU的空闲率，除了上面的WIO以外的空闲时间</span></p>
<p><span color="#000000" style="color: #000000;">5，CPU用于上下文交换的比率</span></p>
<p><span color="#000000" style="color: #000000;">6，nice</span></p>
<p><span color="#000000" style="color: #000000;">7，real-time</span></p>
<p><span color="#000000" style="color: #000000;">8，运行进程队列的长度</span></p>
<p><span color="#000000" style="color: #000000;">9，平均负载</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">Linux中常用的监控CPU整体性能的工具有：</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;"> mpstat： mpstat 不但能查看所有CPU的平均信息，还能查看指定CPU的信息。</span></p>
<p><span face="Arial" style="font-family: Arial;"><span color="#000000" style="color: #000000;"></span><a nclick="javascript.:tagshow(event, 'vmstat');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">vmstat</span></strong></span></a><span color="#000000" style="color: #000000;">：只能查看所有CPU的平均信息；查看cpu队列信息；</span></span></p>
<p><span face="Arial" style="font-family: Arial;"><span color="#000000" style="color: #000000;"></span><a nclick="javascript.:tagshow(event, 'iostat');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">iostat</span></strong></span></a><span color="#000000" style="color: #000000;">: 只能查看所有CPU的平均信息。</span></span></p>
<p><span face="Arial" style="font-family: Arial;"><span color="#000000" style="color: #000000;"></span><a nclick="javascript.:tagshow(event, 'sar');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">sar</span></strong></span></a><span color="#000000" style="color: #000000;">：与mpstat 一样，不但能查看CPU的平均信息，还能查看指定CPU的信息。</span></span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;"> top：显示的信息同ps接近，但是top可以了解到CPU消耗，可以根据用户指定的时间来更新显示。</span></p>
<p><span color="#000000" style="color: #000000;">下面一一介绍：</span></p>
<p><strong><span color="#000000" style="color: #000000;">一，vmstat</span></strong></p>
<p><span color="#000000" style="color: #000000;">[root@localhost ~]#vmstat -n 3&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> (每个3秒刷新一次）<br>procs-----------memory--------------------swap-- ----io----&nbsp;<wbr><wbr>--system----&nbsp;<wbr><wbr>------cpu--------<br>r&nbsp;<wbr><wbr>b&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>swpd&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>free&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> buff&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>cache&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> si&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>so&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> bi&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> bo&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>in&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> cs&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>us&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> sy&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> id &nbsp;<wbr><wbr>wa<br>10&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 144 186164 105252 2386848&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 18&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>166&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>83&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>2&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 48&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 21&nbsp;<wbr><wbr> 31&nbsp;<wbr><wbr> 0<br>20&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 144 189620 105252 2386848&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>177&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>1039 1210&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 34&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 10&nbsp;<wbr><wbr> 56&nbsp;<wbr><wbr> 0<br>00&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 144 214324 105252 2386848&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 10&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>1071&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>670&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 32&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 5&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 63&nbsp;<wbr><wbr> 0<br>00&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 144 202212 105252 2386848&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>189&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>1035&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>558&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 20&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 3&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 77 &nbsp;<wbr><wbr>0<br>20&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 144 158772 105252 2386848&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>203&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>1065 2832&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 70&nbsp;<wbr><wbr> 14&nbsp;<wbr><wbr> 15&nbsp;<wbr><wbr> 0</span></p>
<p><strong><span color="#000000" style="color: #000000;">红色内容标示CPU相关的参数</span></strong></p>
<div><strong><span color="#000000" style="color: #000000;">PROC(ESSES)</span></strong></div>
<div><span color="#000000" style="color: #000000;">--r:如果在processes中运行的序列(process&nbsp;<wbr><wbr>r)是连续的大于在系统中的CPU的个数表示系统现在运行比较慢,有多数的进程等待CPU.<br>如果r的输出数大于系统中可用CPU个数的4倍的话,则系统面临着CPU短缺的问题,或者是CPU的速率过低,系统中有多数的进程在等待CPU,造成系统中进程运行过慢.<br></span></div>
<div><span color="#000000" style="color: #000000;">SYSTEM<br>--in:每秒产生的中断次数<br>--cs:每秒产生的上下文切换次数<br>上面2个值越大，会看到由内核消耗的CPU时间会越大</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><strong><span color="#000000" style="color: #000000;">CPU<br>-us:用户进程消耗的CPU时间百分<br>us的值比较高时，说明用户进程消耗的CPU时间多，但是如果长期超50%的使用，那么我们就该考虑优化程序算法或者进行加速（比如PHP/PERL）<br>-sy:内核进程消耗的CPU时间百分比（sy的值高时，说明系统内核消耗的CPU资源多，这并不是良性表现，我们应该检查原因）</span></strong></div>
<div><span color="#000000" style="color: #000000;">-wa:IO等待消耗的CPU时间百分比<br>wa的值高时，说明IO等待比较严重，这可能由于磁盘大量作随机访问造成，也有可能磁盘出现瓶颈（块操作）。<br>-id:CPU处于空闲状态时间百分比,如果空闲时间(cpu&nbsp;<wbr><wbr>id)持续为0并且系统时间(cpu&nbsp;<wbr><wbr>sy)是用户时间的两倍(cpu&nbsp;<wbr><wbr>us)&nbsp;<wbr><wbr>系统则面临着CPU资源的短缺.&nbsp;<wbr><wbr><br><br>解决办法:<br>当发生以上问题的时候请先调整应用程序对CPU的占用情况.使得应用程序能够更有效的使用CPU.同时可以考虑增加更多的CPU.&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>关于CPU的使用情况还可以结合mpstat,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>ps&nbsp;<wbr><wbr>aux&nbsp;<wbr><wbr>top&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>prstat&nbsp;<wbr><wbr>–a等等一些相应的命令来综合考虑关于具体的CPU的使用情况,和那些进程在占用大量的CPU时间.一般情况下，应用程序的问题会比较大一些.比如一些</span><a nclick="javascript.:tagshow(event, 'SQL');" target="_self" href="http://www.cnblogs.cc2/.:;"></a><span style="text-decoration: underline;"><strong><a target="_self" href="http://hi.baidu.com/handenzhou/blog/item/:;"><span color="#000000" style="color: #000000;"><span style="text-decoration: underline;"><strong>SQL</strong></span></span></a></strong></span><span color="#000000" style="color: #000000;">语句不合理等等都会造成这样的现象.<br></span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">二，sar<br>sar [options] [-A] [-o file] t [n]<br><br>在命令行中，n 和t 两个参数组合起来定义采样间隔和次数，t为采样间隔，是必须有<br>的参数，n为采样次数，是可选的，默认值是1，-o file表示将命令结果以二进制格式<br>存放在文件中，file 在此处不是关键字，是文件名。options 为命令行选项，sar命令<br>的选项很多，下面只列出常用选项：<br><br>-A：所有报告的总和。<br>-u：CPU利用率<br>-v：进程、I节点、文件和锁表状态。<br>-d：硬盘使用报告。<br>-r：内存和交换空间的使用统计。<br>-g：串口I/O的情况。<br>-b：缓冲区使用情况。<br>-a：文件读写情况。<br>-c：系统调用情况。<br>-q：报告队列长度和系统平均负载<br>-R：进程的活动情况。<br>-y：终端设备活动情况。<br>-w：系统交换活动。<br>-x { pid | SELF | ALL }：报告指定进程ID的统计信息，SELF关键字是sar进程本身的统计，ALL关键字是所有系统进程的统计。<br><br></span></div>
<div><span color="#000000" style="color: #000000;">用sar进行CPU利用率的分析</span></div>
<div><span color="#000000" style="color: #000000;">#sar -u 2 10<br>Linux 2.6.18-53.el5PAE (localhost.localdomain)&nbsp;<wbr><wbr> 03/28/2009</span></div>
<div><span color="#000000" style="color: #000000;">07:40:17 PM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> CPU&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %user&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %nice&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %system&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %iowait&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %steal&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %idle<br>07:40:19 PM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> all&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp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br><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 5.91&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 3.99&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> &nbsp;<wbr><wbr>74.95</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">在显示内容包括：<br><br>%user：CPU处在用户模式下的时间百分比。</span></div>
<div><span color="#000000" style="color: #000000;">&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %nice：CPU处在带NICE值的用户模式下的时间百分比。<br>%system：CPU处在系统模式下的时间百分比。<br>%iowait：CPU等待输入输出完成时间的百分比。</span></div>
<div><span color="#000000" style="color: #000000;">&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %steal：管理程序维护另一个虚拟处理器时，虚拟CPU的无意识等待时间百分比。<br>%idle：CPU空闲时间百分比。</span></div>
<div><span color="#000000" style="color: #000000;">&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>
 
在所有的显示中，我们应主要注意%iowait和%idle，%iowait的值过高，表示硬盘存在I/O瓶颈，%idle值高，表示CPU较空闲，如
果%idle值高但系统响应慢时，有可能是CPU等待分配内存，此时应加大内存容量。%idle值如果持续低于10，那么系统的CPU处理能力相对较低，
表明系统中最需要解决的资源是CPU。</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">用sar进行运行进程队列长度分析：</span></div>
<div><span color="#000000" style="color: #000000;">#sar -q 2 10<br>Linux 2.6.18-53.el5PAE (localhost.localdomain)&nbsp;<wbr><wbr> 03/28/2009</span></div>
<div><span color="#000000" style="color: #000000;">07:58:14 PM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> runq-sz&nbsp;<wbr><wbr> plist-sz&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> ldavg-1&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> ldavg-5&nbsp;<wbr><wbr> ldavg-15<br>07:58:16 PM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 493&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.64&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><w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0.68&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.57&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.49</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">runq-sz 准备运行的进程运行队列。<br>plist-sz&nbsp;<wbr><wbr> 进程队列里的进程和线程的数量<br>ldavg-1&nbsp;<wbr><wbr> 前一分钟的系统平均负载(load average)<br>ldavg-5&nbsp;<wbr><wbr> 前五分钟的系统平均负载(load average)<br>ldavg-15 &nbsp;<wbr><wbr>前15分钟的系统平均负载(load average)</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">顺便说一下load avarage的含义</span></div>
<div><span color="#000000" style="color: #000000;">load average可以理解为<span>每秒钟CPU等待运行的进程个数.</span></span></div>
<div><span color="#000000" style="color: #000000;">在Linux系统中，sar -q、uptime、w、top等命令都会有系统平均负载load average的输出，那么什么是系统平均负载呢？<br>系统平均负载被定义为在特定时间间隔内运行队列中的平均任务数。如果一个进程满足以下条件则其就会位于运行队列中：<br>- 它没有在等待I/O操作的结果<br>- 它没有主动进入等待状态(也就是没有调用'wait')<br>- 没有被停止(例如：等待终止)<br>例如：<br># uptime<br>20:55:40 up 24 days,&nbsp;<wbr><wbr> 3:06,&nbsp;<wbr><wbr> 1 user,&nbsp;<wbr><wbr> load average: 8.13, 5.90, 4.94<br>命令输出的最后内容表示在过去的1、5、15分钟内运行队列中的平均进程数量。<br>一
般来说只要每个CPU的当前活动进程数不大于3那么系统的性能就是良好的，如果每个CPU的任务数大于5，那么就表示这台机器的性能有严重问题。对于上面
的例子来说，假设系统有两个CPU，那么其每个CPU的当前任务数为：8.13/2=4.065。这表示该系统的性能是可以接受的。</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">三，iostat</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">#iostat -c 2 10<br>Linux 2.6.18-53.el5PAE (localhost.localdomain)&nbsp;<wbr><wbr> 03/28/2009</span></div>
<div><span color="#000000" style="color: #000000;">avg-cpu:&nbsp;<wbr><wbr> %user&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %nice %system %iowait&nbsp;<wbr><wbr> %steal&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %idle<br>30.10&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 4.89&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 5.63&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 59.38</span></div>
<div><span color="#000000" style="color: #000000;">avg-cpu:&nbsp;<wbr><wbr> %user&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %nice %system %iowait&nbsp;<wbr><wbr> %steal&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %idle<br>8.46&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>1.74&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.25&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 89.55</span></div>
<div><span color="#000000" style="color: #000000;">avg-cpu:&nbsp;<wbr><wbr> %user&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %nice %system %iowait&nbsp;<wbr><wbr> %steal&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %idle<br>22.06&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 11.28&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1.25&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 65.41</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">四，mpstat</span></div>
<div><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">mpstat是Multiprocessor Statistics的缩写，是实时系统<a target="_self" href="http://hi.baidu.com/handenzhou/blog/item/:;"><span style="text-decoration: underline;"><strong>监控</strong></span></a>工具。其报告与CPU的一些统计信息，这些信息存放在/proc/stat文件中。在多CPUs系统里，其不但能查看所有CPU的平均状况信息，而且能够查看特定CPU的信息。下面只介绍 mpstat与CPU相关的参数，mpstat的语法如下：</span></div>
<div>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">mpstat [-P {|ALL}] [internal [count]]</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">参数的含义如下：</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">参数 解释</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">-P {|ALL} 表示监控哪个CPU， cpu在[0,cpu个数-1]中取值</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">internal 相邻的两次采样的间隔时间</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">count 采样的次数，count只能和delay一起使用</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">当没有参数时，mpstat则显示系统启动以后所有信息的平均值。有interval时，第一行的信息自系统启动以来的平均信息。从第二行开始，输出为前一个interval时间段的平均信息。与CPU有关的输出的含义如下：</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">参数 解释从/proc/stat获得数据</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">CPU 处理器ID</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">user 在internal时间段里，用户态的CPU时间（%） ，不包含 nice值为负 进程usr/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">nice 在internal时间段里，nice值为负进程的CPU时间（%） nice/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">system 在internal时间段里，核心时间（%）system/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">iowait 在internal时间段里，硬盘IO等待时间（%） iowait/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">irq 在internal时间段里，软中断时间（%）irq/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">soft 在internal时间段里，软中断时间（%）softirq/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">idle 在internal时间段里，CPU除去等待磁盘IO操作外的因为任何原因而空闲的时间闲置时间 （%）idle/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">intr/s 在internal时间段里，每秒CPU接收的中断的次数 intr/total*100</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">CPU总的<a target="_self" href="http://hi.baidu.com/handenzhou/blog/item/:;"><span style="text-decoration: underline;"><strong>工作</strong></span></a>时间=total_cur=user+system+nice+idle+iowait+irq+softirq</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">total_pre=pre_user+ pre_system+ pre_nice+ pre_idle+ pre_iowait+ pre_irq+ pre_softirq</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">user=user_cur – user_pre</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">total=total_cur-total_pre</span></p>
<p><span color="#000000" face="Arial" style="color: #000000; font-family: Arial;">其中_cur 表示当前值，_pre表示interval时间前的值。上表中的所有值可取到两位小数点。</span></p>
<div><span color="#000000" style="color: #000000;">#mpstat -P ALL 2 10<br>Linux 2.6.18-53.el5PAE (localhost.localdomain)&nbsp;<wbr><wbr> 03/28/2009</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">10:07:57 PM&nbsp;<wbr><wbr> CPU&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %user&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %nice&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %sys %iowait&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %irq&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %soft&nbsp;<wbr><wbr> %steal&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> %idle&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> intr/s<br>10:07:59 PM&nbsp;<wbr><wbr> all&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 20.75&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 10.50&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1.50&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.25&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.25&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 66.75&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1294.50<br>10:07:59 PM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 16.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 9.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1.50&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 73.50&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1000.50<br>10:07:59 PM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 25.76&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 12.12&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1.52&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.51&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0.00&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 60.10&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 294.00</span></div>
<div>&nbsp;<wbr><wbr></div>
<div><span color="#000000" style="color: #000000;">五，top</span></div>
<div>
<div>
<div><span style="font-size: 13px;"><a nclick="javascript.:tagshow(event, 'top');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">top</span></strong></span></a><span color="#000000" style="color: #000000;">命令和ps命令的基本作用是相同的，显示系统当前的进程和<a target="_self" href="http://hi.baidu.com/handenzhou/blog/item/:;"><span style="text-decoration: underline;"><strong>其它</strong></span></a>状
 
况；但是top是一个动态显示过程，即可以通过用户按键来不断刷新当前状态。如果在前台执行该命令，它将独占前台，直到用户终止该程序为止。比较准确的
说，top命令提供了实时的对系统处理器的状态监视。它将显示系统中CPU最“敏感”的任务列表。该命令可以按CPU使用。内存使用和执行时间对任务进行
排序；而且该命令的很多特性都可以通过交互式命令或者在个人定制文件中进行设定。在后面的介绍中将把命令参数和交互命令分开讲述。<br>#top</span></span></div>
<div><span style="font-size: 13px;"><span color="#000000" style="color: #000000;">top - 22:19:58 up 24 days,&nbsp;<wbr><wbr> 4:31,&nbsp;<wbr><wbr> 1 user,&nbsp;<wbr><wbr> load average: 2.08, 1.88, 1.15<br>Tasks: 545 total,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 7 running, 538 sleeping,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0 stopped,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0 zombie<br>Cpu(s): 23.2%us,&nbsp;<wbr><wbr> 6.3%sy,&nbsp;<wbr><wbr> 0.0%ni, 69.7%id,&nbsp;<wbr><wbr> 0.5%wa,&nbsp;<wbr><wbr> 0.2%hi,&nbsp;<wbr><wbr> 0.2%si,&nbsp;<wbr><wbr> 0.0%st<br>Mem:&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 4141608k total,&nbsp;<wbr><wbr> 3992588k used,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 149020k free,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 249092k buffers<br>Swap:&nbsp;<wbr><wbr> 6289352k total,&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 128k used,&nbsp;<wbr><wbr> 6289224k free,&nbsp;<wbr><wbr> 2604200k cached</span></span></div>
<div><span style="font-size: 13px;"><span color="#000000" style="color: #000000;">&nbsp;<wbr><wbr> PID USER&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> PR&nbsp;<wbr><wbr> NI&nbsp;<wbr><wbr> VIRT&nbsp;<wbr><wbr> RES&nbsp;<wbr><wbr> SHR S %CPU %MEM&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> TIME+&nbsp;<wbr><wbr> COMMAND&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp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sp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr><br>23843 nobody&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 16&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0 25900&nbsp;<wbr><wbr> 11m 4116 S&nbsp;<wbr><wbr>&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 1&nbsp;<wbr><wbr> 0.3&nbsp;<wbr><wbr>&nbsp;<wbr><wbr> 0:00.54 httpd&nbsp;<wbr><wbr></span></span></div>
<div>&nbsp;<wbr><wbr></div>
<div>
<p><span style="font-size: 13px;"><span color="#000000" style="color: #000000;">统计信息区<br>前五行是系统整体的统计信息。第一行是任务队列信息，同 uptime 命令的执行结果。其内容如下：</span></span></p>
<p><span color="#000000" style="color: #000000;">22:19:58当前时间<br>up 24 days,&nbsp;<wbr><wbr> 4:31系统运行时间，格式为时:分<br>1 user当前登录用户数<br>load average: 2.08, 1.88, 1.15系统负载，即任务队列的平均长度。<br>三个数值分别为 1分钟、5分钟、15分钟前到现在的平均值。</span></p>
<p><span color="#000000" style="color: #000000;">第二、三行为进程和CPU的信息。当有多个CPU时，这些内容可能会超过两行。内容如下：</span></p>
<p><span color="#000000" style="color: #000000;">Tasks:545total 进程总数<br>7&nbsp;<wbr><wbr>running 正在运行的进程数<br>538sleeping 睡眠的进程数<br>0 stopped 停止的进程数<br>0 zombie 僵尸进程数<br>Cpu(s):23.2%us用户空间占用CPU百分比<br>6.3%sy内核空间占用CPU百分比<br>0.0% ni 用户进程空间内改变过优先级的进程占用CPU百分比<br>69.7%id空闲CPU百分比<br>0.5%wa等待输入输出的CPU时间百分比<br>0.2%hi<br>0.2%si<br>0.0%st</span></p>
<p><span color="#000000" style="color: #000000;">最后两行为内存信息。内容如下：</span></p>
<p><span color="#000000" style="color: #000000;">Mem:4141608k total物理内存总量<br>3992588k used使用的物理内存总量<br>149020k free空闲内存总量<br>249092k buffers用作内核缓存的内存量<br>Swap:6289352k total交换区总量<br>128k used使用的交换区总量<br>6289224k free空闲交换区总量<br>2604200k cached缓冲的交换区总量。<br>内存中的内容被换出到交换区，而后又被换入到内存，但使用过的交换区尚未被覆盖，<br>该数值即为这些内容已存在于内存中的交换区的大小。<br>相应的内存再次被换出时可不必再对交换区写入。</span></p>
<p><span color="#000000" style="color: #000000;">进程信息区<br>统计信息区域的下方显示了各个进程的详细信息。首先来认识一下各列的含义。</span></p>
<p><span color="#000000" style="color: #000000;">序号 列名 含义<br>a PID 进程id<br>b PPID 父进程id<br>c RUSER Real user name<br>d UID 进程所有者的用户id<br>e USER 进程所有者的用户名<br>f GROUP 进程所有者的组名<br>g TTY 启动进程的终端名。不是从终端启动的进程则显示为 ?<br>h PR 优先级<br>i NI nice值。负值表示高优先级，正值表示低优先级<br>j P 最后使用的CPU，仅在多CPU环境下有意义<br>k %CPU 上次更新到现在的CPU时间占用百分比<br>l</span><a nclick="javascript.:tagshow(event, 'TIME');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">TIME</span></strong></span></a><span color="#000000" style="color: #000000;">进程使用的CPU时间总计，单位秒<br>m TIME+ 进程使用的CPU时间总计，单位1/100秒<br>n %MEM 进程使用的物理内存百分比<br>o VIRT 进程使用的虚拟内存总量，单位kb。VIRT=SWAP+RES<br>p SWAP 进程使用的虚拟内存中，被换出的大小，单位kb。<br>q RES 进程使用的、未被换出的物理内存大小，单位kb。RES=CODE+DATA<br>r CODE 可执行</span><a nclick="javascript.:tagshow(event, '%B4%FA%C2%EB');" target="_self" href="http://www.cnblogs.cc2/.:;"><span style="text-decoration: underline;"><strong><span color="#000000" style="color: #000000;">代码</span></strong></span></a><span color="#000000" style="color: #000000;">占用的物理内存大小，单位kb<br>s DATA 可执行代码以外的部分(数据段+栈)占用的物理内存大小，单位kb<br>t SHR 共享内存大小，单位kb<br>u nFLT 页面错误次数<br>v nDRT 最后一次写入到现在，被修改过的页面数。<br>w S 进程状态。<br>D=不可中断的睡眠状态<br>R=运行<br>S=睡眠<br>T=跟踪/停止<br>Z=僵尸进程<br>x COMMAND 命令名/命令行<br>y WCHAN 若该进程在睡眠，则显示睡眠中的系统函数名<br>z Flags 任务标志，参考 sched.h</span></p>
<p><span color="#000000" style="color: #000000;">默认情况下仅显示比较重要的 PID、USER、PR、NI、VIRT、RES、SHR、S、%CPU、%MEM、TIME+、COMMAND 列。可以通过下面的快捷键来更改显示内容。</span></p>
<p><span color="#000000" style="color: #000000;">更改显示内容<br>通过 f 键可以选择显示的内容。按 f 键之后会显示列的列表，按 a-z 即可显示或隐藏对应的列，最后按回车键确定。</span></p>
<p><span color="#000000" style="color: #000000;">按 o 键可以改变列的显示顺序。按小写的 a-z 可以将相应的列向右移动，而大写的 A-Z 可以将相应的列向左移动。最后按回车键确定。</span></p>
<p><span color="#000000" style="color: #000000;">按大写的 F 或 O 键，然后按 a-z 可以将进程按照相应的列进行排序。而大写的 R 键可以将当前的排序倒转。</span></p>
<p><span color="#000000" style="color: #000000;">命令使用</span></p>
<p><span color="#000000" style="color: #000000;">1． 工具（命令）名称<br>top<br>2．工具（命令）作用<br>显示系统当前的进程和<a target="_self" href="http://hi.baidu.com/handenzhou/blog/item/:;"><span style="text-decoration: underline;"><strong>其他</strong></span></a>状
 况； top是一个动态显示过程,即可以通过用户按键来不断刷新当前状态.如果在前台执行该命令,它将独占前台,直到用户终止该程序为止. 
比较准确的说,top命令提供了实时的对系统处理器的状态监视.它将显示系统中CPU最“敏感”的任务列表.该命令可以按CPU使用.内存使用和执行时间
对任务进行排序；而且该命令的很多特性都可以通过交互式命令或者在个人定制文件中进行设定.<br>3．环境设置<br>在Linux下使用。<br>4．使用方法<br>4．1使用格式<br>top [-] [d] [p] [q] [c] [C] [S] [s] [n]<br>4．2参数说明<br>d 指定每两次屏幕信息刷新之间的时间间隔。当然用户可以使用s交互命令来改变之。<br>p 通过指定监控进程ID来仅仅监控某个进程的状态。<br>q该选项将使top没有任何延迟的进行刷新。如果调用程序有超级用户权限，那么top将以尽可能高的优先级运行。<br>S 指定累计模式<br>s 使top命令在安全模式中运行。这将去除交互命令所带来的潜在危险。<br>i 使top不显示任何闲置或者僵死进程。<br>c 显示整个命令行而不只是显示命令名<br>4.3其他<br>下面介绍在top命令执行过程中可以使用的一些交互命令。从使用角度来看，熟练的掌握这些命令比掌握选项还重要一些。这些命令都是单字母的，如果在命令行选项中使用了s选项，则可能其中一些命令会被屏蔽掉。<br>Ctrl+L 擦除并且重写屏幕。<br>h或者? 显示帮助画面，给出一些简短的命令总结说明。<br>k 终止一个进程。系统将提示用户输入需要终止的进程PID，以及需要发送给该进程什么样的信号。一般的终止进程可以使用15信号；如果不能正常结束那就使用信号9强制结束该进程。默认值是信号15。在安全模式中此命令被屏蔽。<br>i 忽略闲置和僵死进程。这是一个开关式命令。<br>q 退出程序。<br>r 重新安排一个进程的优先级别。系统提示用户输入需要改变的进程PID以及需要设置的进程优先级值。输入一个正值将使优先级降低，反之则可以使该进程拥有更高的优先权。默认值是10。<br>S 切换到累计模式。<br>s 改变两次刷新之间的延迟时间。系统将提示用户输入新的时间，单位为s。如果有小数，就换算成m s。输入0值则系统将不断刷新，默认值是5 s。需要注意的是如果设置太小的时间，很可能会引起不断刷新，从而根本来不及看清显示的情况，而且系统负载也会大大增加。<br>f或者F 从当前显示中添加或者删除项目。<br>o或者O 改变显示项目的顺序。<br>l 切换显示平均负载和启动时间信息。<br>m 切换显示内存信息。<br>t 切换显示进程和CPU状态信息。<br>c 切换显示命令名称和完整命令行。<br>M 根据驻留内存大小进行排序。<br>P 根据CPU使用百分比大小进行排序。<br>T 根据时间/累计时间进行排序。<br>W 将当前设置写入~/.toprc文件中。这是写top配置文件的推荐方法。</span></p>
</div>
</div>
</div>
</div></div>
<script type="text/javascript">
if ($ != jQuery) {
	$ = jQuery.noConflict();
}
var isLogined = false;
var cb_blogId = 85095;
var cb_entryId = 2029097;
var cb_blogApp = "dkblog";
var cb_blogUserGuid = "d6531c6d-ee4a-e011-ac81-842b2b196315";
var cb_entryCreatedDate = '2011/4/26 11:19:00';
</script>
<div id="blog_post_info_block">
<div id="BlogPostCategory">分类: <a href="http://www.cnblogs.com/dkblog/category/287388.html">Linux/Unix</a>, <a href="http://www.cnblogs.com/dkblog/category/287399.html">性能测试</a></div>
<div id="EntryTag"></div>
<div id="green_channel" style="">
绿色通道：<a href="javascript:void(0);" id="green_channel_digg" onclick="DiggIt(cb_entryId,cb_blogId,1);green_channel_success(this,'谢谢推荐！');">好文要顶</a><a id="green_channel_follow" onclick="c_follow();" href="javascript:void(0);">关注我</a><a id="green_channel_favorite" onclick="AddToWz(2029097);return false;" href="javascript:void(0);">收藏该文</a><a id="green_channel_contact" href="http://space.cnblogs.com/msg/send/dkcndk" target="_blank">与我联系</a>
<a id="green_channel_weibo" href="javascript:void(0);" title="分享至新浪微博" onclick="ShareToTsina()"><img src="2029097_files/icon_sina.gif" alt=""></a>
</div>
<div id="digg_block">
<div id="author_profile">
<div id="author_profile_info" class="author_profile_info">
<div id="author_profile_detail" class="author_profile_info">
<a href="http://home.cnblogs.com/u/dkblog/">dkcndk</a><br><a href="http://home.cnblogs.com/u/dkblog/followees">关注 - 0</a><br><a href="http://home.cnblogs.com/u/dkblog/followers">粉丝 - 6</a></div>
</div>
<div class="clear"></div>
<div id="author_profile_honor"></div>
<div id="author_profile_follow"><a href="javascript:void(0);" onclick="c_follow();return false;">+加关注</a></div>
</div>
<div id="div_digg" style="">										
	<div class="diggit" onclick="DiggIt(cb_entryId,cb_blogId,1)"> 
		<span class="diggnum" id="digg_count">0</span>
	</div>
	<div class="buryit" onclick="DiggIt(cb_entryId,cb_blogId,2)"> 
		<span class="burynum" id="bury_count">0</span>
	</div>
	<div class="clear"></div>	
	<div class="diggword" id="digg_tips">(请您对文章做出评价)</div>	
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev"><a href="http://www.cnblogs.com/dkblog/archive/2011/04/25/2027242.html" class="p_n_p_prefix">« </a> 博主前一篇：<a href="http://www.cnblogs.com/dkblog/archive/2011/04/25/2027242.html" title="发布于2011-04-25 14:13">iostat来对linux硬盘IO性能进行了解</a><br><a href="http://www.cnblogs.com/dkblog/archive/2011/04/27/2030065.html" class="p_n_p_prefix">» </a> 博主后一篇：<a href="http://www.cnblogs.com/dkblog/archive/2011/04/27/2030065.html" title="发布于2011-04-27 10:05">外交</a><br></div>
</div>
<script type="text/javascript">
LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid);
GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate);
</script>




		</div>
		<div class="postDesc">posted @ 2011-04-26 11:19 <a href="http://www.cnblogs.com/dkblog/">dkcndk</a> 阅读(768) <a href="#commentform">评论(0)</a>  <a href="#" onclick="open_link('http://www.cnblogs.com/dkblog/admin/EditPosts.aspx?postid=2029097')" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(2029097);return false;">收藏</a></div>
	</div>
	<img src="2029097_files/2029097.jpeg" alt="" height="1px" width="1px">
	
</div><!--end: topics 文章、评论容器-->

<script type="text/javascript">
    var commentAuthorHasChecked = false;
    var commentAuthorIsValid = false;
    var commentUrlIsValid = true;
    var commentEmailIsValid = true;
    var authenCodeHasChecked = false;
    var authenCodeIsValid = true;
    var hasLogined = false;
    
    function PostComment() {    
        
        var isValid = true;
        
        if($("#wrapAuthenCode").css("display")=="none"){
            ShowAuthenCode();
            $("#tip_AuthenCode").css("color","red");
            $("#tip_AuthenCode").html("请输入验证码！");
            isValid = false;
        }
        
        if(!hasLogined && !commentAuthorHasChecked){
            CheckAuthor();        
        }                
        if(!hasLogined && !commentAuthorIsValid){
            isValid = false;
        }
                       
        if(!authenCodeHasChecked){
            CheckAuthenCode();            
        }
        if(!authenCodeIsValid){
            isValid = false;
        }
        
        if(!hasLogined && !commentUrlIsValid){            
            isValid = false;
        }        
        if(!commentEmailIsValid){            
            isValid = false;
        }        
        if(!CheckCommentContent()){
            isValid = false;
        }    
        if(!isValid){
            return;
        }

        var content = $("#tbCommentBody").val();
        if(content.length>2000){
            alert("评论内容过长！不允许发布！");
            return;
        }     
        
        if(content.indexOf("　Ｅ　　　　　　　　　Ｅ　　　　　　　　　　Ｅ　　　　　　")>=0){
            alert("该内容不允许布！");
            return;
        }   
        
       if ($("#span_comment_posted").html()!='' && $("#span_comment_posted").html()==content){
            alert("该评论已发表过!");
            return;
        }
        
        $("#tip_comment").html("评论提交中...");
        $("#span_comment_posted").html(content);
        //content = content.replace("'", "\\'");
        var email = $("#tbCommentEmail").val();
        var authenNum = $("#tbAuthenCode").val();
        var authenId = $("#span_comment_test").html();
        var comment = {};
        comment.authenNum = authenNum;
        comment.authenId= authenId;
        comment.parentId = 0;
        comment.blogId = 0;
        comment.sourceUrl = '';
        comment.author = $("#tbCommentAuthor").val();
        comment.url = $("#tbCommentAuthorUrl").val();
        comment.authenCode = $("#tbAuthenCode").val();
        comment.email = email;
        comment.title = '';
        comment.content = content;
        comment.parentCommentId = $("#span_parentcomment_id").html();
        $.ajax({
            url: '/ws/CommentService.asmx/AddAnonymousComment',
            data: $.toJSON(comment),
            type: "post",
            dataType: "json",
            contentType: "application/json; charset=utf8",
            success: function(data) {
               if (data.d["IsSuccess"]) {
                    ShowCommentMsg("感谢您的回复:)");
                    //RereshComments2(comment.parentId);
                    $("#tbCommentBody").val('');
                    //$("#divCommentShow").html(data.d["ReturnData"]+content.replace(/\n/g,"<br/>")+"<br/><br/>");
                    $("#divCommentShow").html($("#divCommentShow").html()+data.d["ReturnData"]); 
                    $("#tip_AuthenCode").html('');
                    RefreshAuthenCode();
                    $("#tbAuthenCode").val("");                    
                    CommentNotify(data.d["CommentID"]);
                }
                else {
                    ShowCommentMsg(data.d["ReturnData"]);//"抱歉！评论提交失败！请与管理员联系。");
                    $("#span_comment_posted").html(''); 
                }
            },
            error: function(xhr) {
                ShowCommentMsg("抱歉！评论提交失败！请与管理员联系。");
                $("#span_comment_posted").html('');  
                //alert(xhr.responseText);
            }
        }
        );
    }
    
    function RefreshAuthenCode(){
        AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",RefreshImg); 
        $("#lnkRereshAuthenCode").html("<span style='color:red'>刷新中...</span>");
        return false;
    }
    
    function RefreshImg(response){
       $("#imgAuthenCode").attr("src","/Modules/CaptchaImage/ValidCodeImage.aspx?id="+encodeURIComponent(response));
       $("#span_comment_test").html(response);
       $("#lnkRereshAuthenCode").html("看不清，换一个");
    }
    
    function ShowAuthenCode(){
        //if($("#wrapAuthenCode").css("display")=="none"){    
        //    AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",ShowAuthenCodeOk);
        //}
        $("#wrapAuthenCode").show();      
    }
    
    function ShowAuthenCodeOk(response){
         UpdateAuthenCode();
         $("#tbAuthenCode").val("");
         $("#wrapAuthenCode").show();
         $("#tip_AuthenCode").html('');
    }  
 
    
    function CheckAuthor(isOnblur){
        commentAuthorHasChecked = true;
        var maxLength = 30;
        if($("#tbCommentAuthor").val().length == 0){
            $("#tip_author").html("请输入您的昵称！");
            commentAuthorIsValid = false;
            return false;
        }     
        else if($("#tbCommentAuthor").val().length > maxLength){
            $("#tip_author").html("昵称不允许超过" + maxLength + "个字符！");
            commentAuthorIsValid = false;
            return false;
        }
        else{
            //if(isOnblur){
                AjaxPost("/ws/CommentService.asmx/IsAuthorExist","{author:'"+$("#tbCommentAuthor").val()+"'}" ,OnCheckAuthorExist);
            //}
            //else{
            //    $("#tip_author").html("");
            //    commentAuthorIsValid = true;
            //}
            return true;
        }
   }
   
    function OnCheckAuthorExist(response){        
        if(!response){
            $("#tip_author").html("");
            commentAuthorIsValid = true;
        }
        else{
            $("#tip_author").html("该昵称已被使用，请更换昵称");
            commentAuthorIsValid = false;
        }
   }
   
    function CheckUrl(){
        var maxLength = 50;
        var url = $("#tbCommentAuthorUrl").val();
        
        if(url.length == 0){
            commentUrlIsValid = true;
            return true;
        }
        else if(url.length > maxLength){
            $("#tip_url").html("主页地址不允许超过" + maxLength + "个字符！");
            commentUrlIsValid = false;
            return false;
        }
        else if(url.indexOf("http://")!=0 || url.indexOf(".") < 0){
            $("#tip_url").html("主页地址要以“http://”开头");
            commentUrlIsValid = false;
            return false;
        }
        else{
            $("#tip_url").html("");
            commentUrlIsValid = true;
            return true;
        }
   }
   
   function CheckEmail(){
        var email = $("#tbCommentEmail").val();
        if(email.length>0){
            var regExp = new RegExp("\\w+@((\\w|\-)+\\.)+[a-z]{2,3}");
            if(!regExp.test(email)){
                $("#tip_email").html("请输入正确的邮件地址!");
                commentEmailIsValid = false;
            }
            else{
                commentEmailIsValid = true;
                 $("#tip_email").html("");
            }
        }
        else{
            commentEmailIsValid = true;
            $("#tip_email").html("");  
        }
   }
   
   function CheckAuthenCode(){
        authenCodeHasChecked = true;
        var num = $("#tbAuthenCode").val();
        var id = $("#span_comment_test").html();
        $("#tip_AuthenCode").css("color","red");
        if(num.length==0){
             authenCodeIsValid = false;
             $("#tip_AuthenCode").html("请输入验证码！");
             return;
        }
        else if(num.length!=4){
            authenCodeIsValid = false;
            $("#tip_AuthenCode").html("请输入四位数字！");
             return;
        }
        else if(new RegExp("(\d+)").test(num)){
            authenCodeIsValid = false;
            $("#tip_AuthenCode").html("请输入四位数字！");
             return;
        }
        else{
            AjaxPost("/ws/CommentService.asmx/CheckAuthenCode","{number:"+num+",id:'"+id+"'}", OnCheckAuthenCode);
        }
   }
   
   function OnCheckAuthenCode(response){
        if(response){
            $("#tip_AuthenCode").css("color","green");
            $("#tip_AuthenCode").html("验证码输入正确！");
            authenCodeIsValid = true;            
        }
        else{
            $("#tip_AuthenCode").css("color","red");
            $("#tip_AuthenCode").html("验证码输错啦！");
            RefreshAuthenCode();
            authenCodeIsValid = false;           
        }
   }
   
   function CheckCommentContent(){
    if($("#tbCommentBody").val().length==0){
        alert("请输入评论内容！");
        return false;
    }
    return true;
   }
    
</script>
<div id="ctl03_comment_form" class="commentform">

<script type="text/javascript">
    try {
        SyntaxHighlighter.all();
        isSyntaxHighlighted = true;
    } catch (e) { }
</script>


<div id="ctl03_divLoginPannel">
<div class="login_tips">注册用户登录后才能发表评论，请 <a rel="nofollow" href="http://passport.cnblogs.com/login.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fdkblog%2farchive%2f2011%2f04%2f26%2f2029097.html%3flogin%3d1%23commentform" class="underline">登录</a> 或 <a rel="nofollow" href="http://passport.cnblogs.com/register.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fdkblog%2farchive%2f2011%2f04%2f26%2f2029097.html%23Bottom2" class="underline">注册</a>，<a href="http://www.cnblogs.com/" target="_blank">返回博客园首页</a>。</div>
</div>

<div id="clear_read_link"><a href="http://archive.cnblogs.com/a/2029097/" target="_blank">简洁阅读版式</a></div>
<script type="text/javascript">
    $("#clear_read_link").html('<a href="http://archive.cnblogs.com/a/' + cb_entryId + '/" target="_blank">简洁阅读版式</a>')
</script>
<div id="ctl03_UnderCommentBox1_ad_text_commentbox" class="ad_text_commentbox">
<a href="http://q.cnblogs.com/" target="_blank">新版博问上线，帮您解决IT难题</a>
</div>
<div id="site_nav_under">
<a href="http://www.cnblogs.com/" target="_blank" title="程序员的网上家园">首页</a><a href="http://q.cnblogs.com/" target="_blank">博问</a><a href="http://home.cnblogs.com/ing/" target="_blank">闪存</a><a href="http://news.cnblogs.com/" target="_blank" title="IT新闻">新闻</a><a href="http://home.cnblogs.com/" target="_blank">园子</a><a href="http://job.cnblogs.com/" target="_blank" title="程序员招聘">招聘</a><a href="http://kb.cnblogs.com/" target="_blank">知识库</a> 

</div>

<div class="itnews c_ad_block">
<b>最新IT新闻</b>:<br>

          ·  <a href="http://news.cnblogs.com/n/123158/" target="_blank">骰子作画的算法</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/123157/" target="_blank">为何苹果叫停 App Store 游戏订阅服务</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/123156/" target="_blank">Galaxy Nexus 可以看作 Google 的 iPhone 5</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/123155/" target="_blank">Valve认为PC盗版不是价格问题</a><br>
	
          ·  <a href="http://news.cnblogs.com/n/123154/" target="_blank">从安卓看专利敲诈</a><br>
	
» <a href="http://news.cnblogs.com/" title="IT新闻" target="_blank">更多新闻...</a>
</div>


<div class="itnews c_ad_block" id="kb_block">
<b>最新知识库文章</b>:<br>
<div id="kb_recent">

·  <a href="http://kb.cnblogs.com/page/123038/" target="_blank">高德纳（Knuth）谈计算机程序设计艺术（上）</a><br>

·  <a href="http://kb.cnblogs.com/page/111437/" target="_blank">整洁的代码 VS 卓越的代码</a><br>

·  <a href="http://kb.cnblogs.com/page/111334/" target="_blank">浅谈 HTML5 的 DOM Storage 机制</a><br>

·  <a href="http://kb.cnblogs.com/page/111208/" target="_blank">解依赖与接缝</a><br>

·  <a href="http://kb.cnblogs.com/page/122430/" target="_blank">如何成为一个C++高级程序员</a><br>

</div>
» <a href="http://kb.cnblogs.com/" target="_blank">更多知识库文章...</a>
</div>

<script type="text/javascript">
    var googletag = googletag || {};
    googletag.cmd = googletag.cmd || [];
    (function () {
        var gads = document.createElement('script');
        gads.async = true;
        gads.type = 'text/javascript';
        var useSSL = 'https:' == document.location.protocol;
        gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
        var node = document.getElementsByTagName('script')[0];
        node.parentNode.insertBefore(gads, node);
    })();
</script>

<script type="text/javascript">
    try {
        googletag.cmd.push(function () {
            googletag.defineSlot('/1090369/cnblogs_blogpost_C1', [300, 250], 'div-gpt-ad-1320933818841-0').addService(googletag.pubads());
            googletag.defineSlot('/1090369/cnblogs_blogpost_C2', [468, 60], 'div-gpt-ad-1320933818841-1').addService(googletag.pubads());
            googletag.pubads().enableSingleRequest();
            googletag.enableServices();
        });
    } catch (e) { }
</script>
<div class="c_ad_block">
<!-- cnblogs_blogpost_C1 -->
<div id="div-gpt-ad-1320933818841-0" style="width: 300px; height: 250px;">
<script type="text/javascript">
    try {
        googletag.cmd.push(function () { googletag.display('div-gpt-ad-1320933818841-0'); });
    } catch (e) { }
</script>
<iframe style="border: 0pt none;" marginheight="0" marginwidth="0" name="google_ads_iframe_/1090369/cnblogs_blogpost_C1_0" id="google_ads_iframe_/1090369/cnblogs_blogpost_C1_0" frameborder="0" height="250" scrolling="no" width="300"></iframe><iframe style="border: 0pt none; visibility: hidden; display: none;" marginheight="0" marginwidth="0" name="google_ads_iframe_/1090369/cnblogs_blogpost_C1_0__hidden__" id="google_ads_iframe_/1090369/cnblogs_blogpost_C1_0__hidden__" frameborder="0" height="0" scrolling="no" width="0"></iframe></div>
</div>
<div class="c_ad_block">
<!-- cnblogs_blogpost_C2 -->
<div id="div-gpt-ad-1320933818841-1" style="width: 468px; height: 60px;">
<script type="text/javascript">
    try {
        googletag.cmd.push(function () { googletag.display('div-gpt-ad-1320933818841-1'); });
    } catch (e) { }
</script>
<iframe style="border: 0pt none;" marginheight="0" marginwidth="0" name="google_ads_iframe_/1090369/cnblogs_blogpost_C2_0" id="google_ads_iframe_/1090369/cnblogs_blogpost_C2_0" frameborder="0" height="60" scrolling="no" width="468"></iframe></div>
</div>

<div id="HistoryToday" class="c_ad_block">
</div>
<script type="text/javascript">
    $(document).ready(function () {
        GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate);
    });
</script>
<div id="ctl03_UnderCommentBox1_ad_under_comment2" class="c_ad_block">
<a href="http://www.china-pub.com/STATIC07/1107/2011chinapub_6810_110718/2011chinapub_6810_110718.asp" target="_blank" rel="nofollow"><img src="2029097_files/china-pub.jpg" alt="" style="border: 0px none;"></a><br>
<a href="http://www.china-pub.com/STATIC07/1107/zh_autumntb_110725/zh_autumntb_110725.asp" target="_blank" rel="nofollow">China-pub 2011秋季教材巡展</a><br>
<a href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" target="_blank" rel="nofollow">China-Pub 计算机绝版图书按需印刷服务</a><br>
</div>



</div>


			
	</div><!--end: forFlow -->
	</div><!--end: mainContent 主体内容容器-->

	<div id="sideBar">
		<div id="sideBarMain">
			
<!--done-->
<div class="newsItem">
<h3 class="catListTitle">公告</h3>
	<div id="profile_block">昵称：<a href="http://home.cnblogs.com/u/dkblog/">dkcndk</a><br>园龄：<a href="http://home.cnblogs.com/u/dkblog/" title="入园时间：2011-03-10">8个月</a><br>粉丝：<a href="http://home.cnblogs.com/u/dkblog/followers/">6</a><br>关注：<a href="http://home.cnblogs.com/u/dkblog/followees/">0</a><div id="p_b_follow"><a href="javascript:void(0);" onclick="cnblogs.UserManager.FollowBlogger('d6531c6d-ee4a-e011-ac81-842b2b196315')">+加关注</a></div><script type="text/javascript">cnblogs.UserManager.GetFollowStatus('d6531c6d-ee4a-e011-ac81-842b2b196315')</script></div>
</div>

			<div id="calendar"><table id="Calendar1_entryCal" class="Cal" title="Calendar" cellpadding="0" cellspacing="0">
	<tbody><tr><td colspan="7"><table class="CalTitle" cellspacing="0">
		<tbody><tr><td class="CalNextPrev"><a href="javascript:__doPostBack('Calendar1$entryCal','V4077')" style="color: Black;" title="Go to the previous month">&lt;</a></td><td align="center">2011年4月</td><td class="CalNextPrev" align="right"><a href="javascript:__doPostBack('Calendar1$entryCal','V4138')" style="color: Black;" title="Go to the next month">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th class="CalDayHeader" abbr="日" scope="col" align="center">日</th><th class="CalDayHeader" abbr="一" scope="col" align="center">一</th><th class="CalDayHeader" abbr="二" scope="col" align="center">二</th><th class="CalDayHeader" abbr="三" scope="col" align="center">三</th><th class="CalDayHeader" abbr="四" scope="col" align="center">四</th><th class="CalDayHeader" abbr="五" scope="col" align="center">五</th><th class="CalDayHeader" abbr="六" scope="col" align="center">六</th></tr><tr><td class="CalOtherMonthDay" align="center">27</td><td class="CalOtherMonthDay" align="center">28</td><td class="CalOtherMonthDay" align="center">29</td><td class="CalOtherMonthDay" align="center">30</td><td class="CalOtherMonthDay" align="center">31</td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/1.html"><u>1</u></a></td><td class="CalWeekendDay" align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/2.html"><u>2</u></a></td></tr><tr><td class="CalWeekendDay" align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/8.html"><u>8</u></a></td><td class="CalWeekendDay" align="center">9</td></tr><tr><td class="CalWeekendDay" align="center">10</td><td align="center">11</td><td align="center">12</td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/13.html"><u>13</u></a></td><td align="center">14</td><td align="center">15</td><td class="CalWeekendDay" align="center">16</td></tr><tr><td class="CalWeekendDay" align="center">17</td><td align="center">18</td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/19.html"><u>19</u></a></td><td align="center">20</td><td align="center">21</td><td align="center">22</td><td class="CalWeekendDay" align="center">23</td></tr><tr><td class="CalWeekendDay" align="center">24</td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/25.html"><u>25</u></a></td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/26.html"><u>26</u></a></td><td align="center"><a href="http://www.cnblogs.com/dkblog/archive/2011/4/27.html"><u>27</u></a></td><td align="center">28</td><td align="center">29</td><td class="CalWeekendDay" align="center">30</td></tr><tr><td class="CalOtherMonthDay" align="center">1</td><td class="CalOtherMonthDay" align="center">2</td><td class="CalOtherMonthDay" align="center">3</td><td class="CalOtherMonthDay" align="center">4</td><td class="CalOtherMonthDay" align="center">5</td><td class="CalOtherMonthDay" align="center">6</td><td class="CalOtherMonthDay" align="center">7</td></tr>
</tbody></table>
</div>
			
			<div id="leftcontentcontainer">
				
<script type="text/javascript">
    var blogapp = 'dkblog';
</script>
<div class="mySearch">
<h3 class="catListTitle">搜索</h3>
<div id="widget_my_zzk" class="div_my_zzk"><input id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk" type="text">&nbsp;<input onclick="zzk_go()" value="找找看" id="btnZzk" class="btn_my_zzk" type="button"></div>
<div id="SingleColumn1_ctl00_widget_my_google" class="div_my_zzk"><input name="google_q" id="google_q" onkeydown="return google_go_enter(event)" class="input_my_zzk" type="text">&nbsp;<input onclick="google_go()" value="谷歌搜索" class="btn_my_zzk" type="button"></div>
</div>


<div class="catListLink">
<h3 class="catListTitle">常用链接</h3>
<ul>

		<li><a id="SingleColumn1_ctl01_rptMainLinks_lnkLinkItem_0" href="http://www.cnblogs.com/dkblog/MyPosts.html">我的随笔</a></li>
	
		<li><a id="SingleColumn1_ctl01_rptMainLinks_lnkLinkItem_1" href="http://www.cnblogs.com/dkblog/MyComments.html">我的评论</a></li>
	
		<li><a id="SingleColumn1_ctl01_rptMainLinks_lnkLinkItem_2" title="我发表过评论的随笔" href="http://www.cnblogs.com/dkblog/OtherPosts.html">我的参与</a></li>
	
		<li><a id="SingleColumn1_ctl01_rptMainLinks_lnkLinkItem_3" href="http://www.cnblogs.com/dkblog/RecentComments.html">最新评论</a></li>
	
		<li><a id="SingleColumn1_ctl01_rptMainLinks_lnkLinkItem_4" href="http://www.cnblogs.com/dkblog/tag/">我的标签</a></li>
	
</ul>
<div id="itemListLin_con" style="display:none;">
<ul>

</ul>
</div>
</div>
<div class="catListPostCategory">
<h3 class="catListTitle">随笔分类<span style="font-size:11px;font-weight:normal">(168)</span></h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_0" href="http://www.cnblogs.com/dkblog/category/288322.html">C/C++(8)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_0" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/288322.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_1" href="http://www.cnblogs.com/dkblog/category/287397.html">Cloud Compute &amp; Storage(24)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_1" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287397.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_2" href="http://www.cnblogs.com/dkblog/category/287391.html">DataBase(1)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_2" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287391.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_3" href="http://www.cnblogs.com/dkblog/category/287401.html">DK's Gmail邀请</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_3" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287401.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_4" href="http://www.cnblogs.com/dkblog/category/287400.html">Finance</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_4" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287400.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_5" href="http://www.cnblogs.com/dkblog/category/287386.html">Java(4)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_5" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287386.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_6" href="http://www.cnblogs.com/dkblog/category/287389.html">JavaScript/AJAX(1)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_6" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287389.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_7" href="http://www.cnblogs.com/dkblog/category/287388.html">Linux/Unix(49)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_7" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287388.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_8" href="http://www.cnblogs.com/dkblog/category/287387.html">php</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_8" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287387.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_9" href="http://www.cnblogs.com/dkblog/category/287392.html">Protocol(1)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_9" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287392.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_10" href="http://www.cnblogs.com/dkblog/category/287362.html">Python(51)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_10" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287362.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_11" href="http://www.cnblogs.com/dkblog/category/287390.html">Semantic Web</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_11" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287390.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_12" href="http://www.cnblogs.com/dkblog/category/287398.html">架构及运营(3)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_12" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287398.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_13" href="http://www.cnblogs.com/dkblog/category/287458.html">乱弹(6)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_13" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287458.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_14" href="http://www.cnblogs.com/dkblog/category/287395.html">项目管理&amp;HR(8)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_14" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287395.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_15" href="http://www.cnblogs.com/dkblog/category/287399.html">性能测试(12)</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_15" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287399.html/rss');">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_0_Link_16" href="http://www.cnblogs.com/dkblog/category/287402.html">在线手册</a> <a id="SingleColumn1_Categories_CatList_LinkList_0_RssLink_16" href="#" onclick="return open_link('http://www.cnblogs.com/dkblog/category/287402.html/rss');">(rss)</a></li>

</ul>

</div>

<div class="catListPostArchive">
<h3 class="catListTitle">随笔档案<span style="font-size:11px;font-weight:normal">(523)</span></h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_0" href="http://www.cnblogs.com/dkblog/archive/2011/11.html">2011年11月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_1" href="http://www.cnblogs.com/dkblog/archive/2011/10.html">2011年10月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_2" href="http://www.cnblogs.com/dkblog/archive/2011/09.html">2011年9月 (17)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_3" href="http://www.cnblogs.com/dkblog/archive/2011/08.html">2011年8月 (11)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_4" href="http://www.cnblogs.com/dkblog/archive/2011/07.html">2011年7月 (24)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_5" href="http://www.cnblogs.com/dkblog/archive/2011/06.html">2011年6月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_6" href="http://www.cnblogs.com/dkblog/archive/2011/05.html">2011年5月 (9)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_7" href="http://www.cnblogs.com/dkblog/archive/2011/04.html">2011年4月 (15)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_8" href="http://www.cnblogs.com/dkblog/archive/2011/03.html">2011年3月 (29)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_9" href="http://www.cnblogs.com/dkblog/archive/2011/02.html">2011年2月 (18)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_10" href="http://www.cnblogs.com/dkblog/archive/2011/01.html">2011年1月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_11" href="http://www.cnblogs.com/dkblog/archive/2010/12.html">2010年12月 (11)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_12" href="http://www.cnblogs.com/dkblog/archive/2010/11.html">2010年11月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_13" href="http://www.cnblogs.com/dkblog/archive/2010/10.html">2010年10月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_14" href="http://www.cnblogs.com/dkblog/archive/2010/06.html">2010年6月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_15" href="http://www.cnblogs.com/dkblog/archive/2010/05.html">2010年5月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_16" href="http://www.cnblogs.com/dkblog/archive/2010/04.html">2010年4月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_17" href="http://www.cnblogs.com/dkblog/archive/2010/03.html">2010年3月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_18" href="http://www.cnblogs.com/dkblog/archive/2010/01.html">2010年1月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_19" href="http://www.cnblogs.com/dkblog/archive/2009/12.html">2009年12月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_20" href="http://www.cnblogs.com/dkblog/archive/2009/11.html">2009年11月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_21" href="http://www.cnblogs.com/dkblog/archive/2009/10.html">2009年10月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_22" href="http://www.cnblogs.com/dkblog/archive/2009/09.html">2009年9月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_23" href="http://www.cnblogs.com/dkblog/archive/2009/08.html">2009年8月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_24" href="http://www.cnblogs.com/dkblog/archive/2009/07.html">2009年7月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_25" href="http://www.cnblogs.com/dkblog/archive/2009/06.html">2009年6月 (19)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_26" href="http://www.cnblogs.com/dkblog/archive/2009/05.html">2009年5月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_27" href="http://www.cnblogs.com/dkblog/archive/2009/04.html">2009年4月 (8)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_28" href="http://www.cnblogs.com/dkblog/archive/2009/03.html">2009年3月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_29" href="http://www.cnblogs.com/dkblog/archive/2008/12.html">2008年12月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_30" href="http://www.cnblogs.com/dkblog/archive/2008/10.html">2008年10月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_31" href="http://www.cnblogs.com/dkblog/archive/2008/09.html">2008年9月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_32" href="http://www.cnblogs.com/dkblog/archive/2008/08.html">2008年8月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_33" href="http://www.cnblogs.com/dkblog/archive/2008/07.html">2008年7月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_34" href="http://www.cnblogs.com/dkblog/archive/2008/06.html">2008年6月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_35" href="http://www.cnblogs.com/dkblog/archive/2008/05.html">2008年5月 (8)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_36" href="http://www.cnblogs.com/dkblog/archive/2008/04.html">2008年4月 (11)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_37" href="http://www.cnblogs.com/dkblog/archive/2008/03.html">2008年3月 (24)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_38" href="http://www.cnblogs.com/dkblog/archive/2008/02.html">2008年2月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_39" href="http://www.cnblogs.com/dkblog/archive/2008/01.html">2008年1月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_40" href="http://www.cnblogs.com/dkblog/archive/2007/12.html">2007年12月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_41" href="http://www.cnblogs.com/dkblog/archive/2007/11.html">2007年11月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_42" href="http://www.cnblogs.com/dkblog/archive/2007/10.html">2007年10月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_43" href="http://www.cnblogs.com/dkblog/archive/2007/09.html">2007年9月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_44" href="http://www.cnblogs.com/dkblog/archive/2007/08.html">2007年8月 (9)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_45" href="http://www.cnblogs.com/dkblog/archive/2007/07.html">2007年7月 (10)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_46" href="http://www.cnblogs.com/dkblog/archive/2007/06.html">2007年6月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_47" href="http://www.cnblogs.com/dkblog/archive/2007/05.html">2007年5月 (13)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_48" href="http://www.cnblogs.com/dkblog/archive/2007/04.html">2007年4月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_49" href="http://www.cnblogs.com/dkblog/archive/2007/03.html">2007年3月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_50" href="http://www.cnblogs.com/dkblog/archive/2007/01.html">2007年1月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_51" href="http://www.cnblogs.com/dkblog/archive/2006/12.html">2006年12月 (8)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_52" href="http://www.cnblogs.com/dkblog/archive/2006/11.html">2006年11月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_53" href="http://www.cnblogs.com/dkblog/archive/2006/10.html">2006年10月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_54" href="http://www.cnblogs.com/dkblog/archive/2006/09.html">2006年9月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_55" href="http://www.cnblogs.com/dkblog/archive/2006/08.html">2006年8月 (8)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_56" href="http://www.cnblogs.com/dkblog/archive/2006/07.html">2006年7月 (6)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_57" href="http://www.cnblogs.com/dkblog/archive/2006/06.html">2006年6月 (9)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_58" href="http://www.cnblogs.com/dkblog/archive/2006/05.html">2006年5月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_59" href="http://www.cnblogs.com/dkblog/archive/2006/04.html">2006年4月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_60" href="http://www.cnblogs.com/dkblog/archive/2006/03.html">2006年3月 (15)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_61" href="http://www.cnblogs.com/dkblog/archive/2006/02.html">2006年2月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_62" href="http://www.cnblogs.com/dkblog/archive/2006/01.html">2006年1月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_63" href="http://www.cnblogs.com/dkblog/archive/2005/12.html">2005年12月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_64" href="http://www.cnblogs.com/dkblog/archive/2005/11.html">2005年11月 (7)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_65" href="http://www.cnblogs.com/dkblog/archive/2005/10.html">2005年10月 (4)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_66" href="http://www.cnblogs.com/dkblog/archive/2005/09.html">2005年9月 (3)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_67" href="http://www.cnblogs.com/dkblog/archive/2005/08.html">2005年8月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_68" href="http://www.cnblogs.com/dkblog/archive/2005/07.html">2005年7月 (2)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_69" href="http://www.cnblogs.com/dkblog/archive/2005/06.html">2005年6月 (12)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_70" href="http://www.cnblogs.com/dkblog/archive/2005/05.html">2005年5月 (9)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_71" href="http://www.cnblogs.com/dkblog/archive/2005/04.html">2005年4月 (11)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_LinkList_1_Link_72" href="http://www.cnblogs.com/dkblog/archive/2005/03.html">2005年3月 (8)</a> </li>

</ul>

</div>



<div class="catListComment">
<h3 class="catListTitle">最新评论</h3>
	<div id="RecentCommentsBlock"><ul>
    <li class="recent_comment_title"><a href="http://www.cnblogs.com/dkblog/archive/2011/07/19/2110672.html#2184503">1. Re:iozone的介绍与使用</a></li>
    <li class="recent_comment_body">你好，请问-i 8  （radom mix）是不是类似，iometer 的 percent read/write distribution 的功能，就是随意混合读写，而不是单独的读或者写？<br>谢谢！</li>
    <li class="recent_comment_author">--dandan0405</li>
    <li class="recent_comment_title"><a href="http://www.cnblogs.com/dkblog/archive/2010/12/07/1980685.html#2097477">2. Re:SourceForge上发布dedup util 收藏 </a></li>
    <li class="recent_comment_body">楼主您好，我装libz-dev的时候遇到点儿困难，去网上下载libz-dev没有找到，能不能发一个链接。邮箱619478793@qq.com</li>
    <li class="recent_comment_author">--pumer008</li>
</ul>
</div>
</div>

<div class="catListView">
<h3 class="catListTitle">阅读排行榜</h3>
	<div id="TopViewPostsBlock"><ul><li><a href="http://www.cnblogs.com/dkblog/archive/2006/11/16/1980925.html">1. ORACLE默认用户的问题？(1281)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/08/19/2145939.html">2. 经典开源C/C++项目(1146)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2009/04/16/1980757.html">3. python下编译py成pyc和pyo(1127)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/06/24/2089026.html">4. python异常处理(937)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/05/12/2044095.html">5. ZeroMQ：云计算时代最好的通讯库(928)</a></li></ul></div>
</div>

<div class="catListFeedback">
<h3 class="catListTitle">评论排行榜</h3>
	<div id="TopFeedbackPostsBlock"><ul><li><a href="http://www.cnblogs.com/dkblog/archive/2010/12/07/1980685.html">1. SourceForge上发布dedup util 收藏(1)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/07/19/2110672.html">2. iozone的介绍与使用(1)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/07/18/2109779.html">3. 敏捷开发中的Code Review(0)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/07/14/2106472.html">4. svn在linux下的使用命令(0)</a></li><li><a href="http://www.cnblogs.com/dkblog/archive/2011/07/14/2105934.html">5. 人民日报：中国今天的改革要突破利益“雷区”(0)</a></li></ul></div>
</div>

<div class="catListView">
<h3 class="catListTitle">推荐排行榜</h3>
<div id="TopDiggPostsBlock"><ul><li><a href="http://www.cnblogs.com/dkblog/archive/2010/12/07/1980685.html">1. SourceForge上发布dedup util 收藏(1)</a></li></ul></div>
</div>
			</div>
			
		</div><!--end: sideBarMain -->
	</div><!--end: sideBar 侧边栏容器 -->
	<div class="clear"></div>
	</div><!--end: main -->
	<div class="clear"></div>
	<div id="footer">
		
<!--done-->
Copyright ©2011 dkcndk
	</div><!--end: footer -->
</div><!--end: home 自定义的最大容器 -->
</form> 
<script type="text/javascript">
    if (!isSyntaxHighlighted) {
        try {
            SyntaxHighlighter.all();
        } catch (e) { }
    }
</script>
<script type="text/javascript" src="2029097_files/ShowHidden.js"></script>
<script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-476124-1']);
    _gaq.push(['_setDomainName', 'cnblogs.com']);
    _gaq.push(['_trackPageview']);

    (function () {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
</script>


</body></html>